import App from './App'
// import './static/font/font.scss'

// #ifndef VUE3
import Vue from 'vue'
import store from './store'
import uView from 'uview-ui';


Vue.use(uView);
Vue.prototype.$store = store
Vue.config.productionTip = false
App.mpType = 'app'

// 星期显示格式化
Vue.filter('weekFormat', value => {
    const obj = {
		1: '星期一',
		2: '星期二',
		3: '星期三',
		4: '星期四',
		5: '星期五',
		6: '星期六',
		7: '星期日',
	}
	return obj[value]
})

Vue.filter('fixed2', value => {
   if(value) {
	   return value.toFixed(2)
   }else {
	   return value
   }
})

Vue.filter('dayFormat', value => {
   if(value) {
	 if(new Date(value).getFullYear() === new Date().getFullYear())  {
		return uni.$u.timeFormat(value, 'mm月dd日');
	 }else {
		 return uni.$u.timeFormat(value, 'yyyy年mm月dd日');
	 }
   }
})


const app = new Vue({
    ...App
})

require('./utils/request/index.js')(app)
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif